﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SevenWizards1.CoreComponents;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace SevenWizards1
{
    class StartScreen : GameScreen
    {
        ButtonMenu buttonMenu;

        public StartScreen(Game game, SpriteFont spriteFont, Texture2D background,
            Texture2D buttonImage)
            : base(game)
        {
            Components.Add(new BackgroundComponent(game, background));

            string[] items = { "Load Game", "New Game", "Quit" };

            buttonMenu = new ButtonMenu(game, spriteFont, buttonImage);
            buttonMenu.SetMenuItems(items);
            Components.Add(buttonMenu);
        }

        public int SelectedIndex
        {
            get { return buttonMenu.SelectedIndex; }
        }

        public override void Show()
        {
            buttonMenu.Position = new Vector2((Game.Window.ClientBounds.Width
                                        - buttonMenu.Width) / 2, 450);
            base.Show();
        }

        public override void Hide()
        {
            base.Hide();
        }
    }
}